package com.copm.ifm.servers.sys.client;

import com.copm.ifm.base.basic.ServiceResponse;
import com.copm.ifm.servers.sys.entity.SysTenantMenu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 菜单表开放接口声明类
 *
 * @author tp
 * @date 2020/12/15 15:55
 */
@FeignClient(value = "sys", contextId = "sysMenu")
@RequestMapping("/sys-menu")
public interface SysMenuClient {

    @GetMapping("/by/tenantId")
    ServiceResponse<List<SysTenantMenu>> getSysMenuById(@RequestParam int tenantId);

    @GetMapping("/async-staff")
    void asyncStaff(@RequestParam Long roleId,
                    @RequestParam Map<String, List<String>> menuId2OptionListMap,
                    @RequestParam Boolean isSyncChangeStaff,
                    @RequestParam Long currentUserId);

}
